home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / amiutils / i_l / jacosub / documentation / arexx.doc next >
Text File  |  1995-12-30  |  7KB  |  200 lines

  1. JACOsub ARexx Communications
  2. ============================
  3.  
  4.  
  5. EXECUTING AREXX SCRIPTS FROM JACOSUB
  6. ====================================
  7.  
  8. You can execute ARexx scripts at specific times in JACOsub scripts while
  9. the JACOsub script is playing.  Simply use the RX directive in a timed
  10. line.  The format of such a line in a JACOsub script is:
  11.  
  12. <start time> <end time> RX <ARexx script name to execute>
  13.  
  14. <end time> is ignored, but should be slightly greater than the start time
  15. to avoid a compiler warning.  See the RX directive in the file JScripts.doc
  16. for more information.
  17.  
  18.  
  19. COMMUNICATING WITH JACOSUB THROUGH AREXX
  20. ========================================
  21.  
  22. JACOsub's ARexx port is called 'JACOsub' (note the capitalization).  The
  23. program accepts several different commands through its ARexx port.  They
  24. are described below, grouped into the categories of file commands, script
  25. play commands, and editor commands.  Examples of usage for file commands
  26. and script play commands may be found in the rexx subdirectory.
  27.  
  28.  
  29. ARexx file commands
  30. -------------------
  31.  
  32. 'LOADSCRIPT' FILENAME/A
  33.  
  34.    Load a script called FILENAME into memory.  FILENAME should end with an
  35.    appropriate script extension (such as ".js").  RESULT is returned as
  36.    0=success, 1=failure.
  37.  
  38. 'SAVESCRIPT' FILENAME/A
  39.  
  40.    Write the script currently in memory to a file using the name FILENAME.
  41.    RESULT is returned as 0=success, 1=failure.
  42.  
  43. 'QUIT'
  44.  
  45.    Terminate JACOsub, remove from memory.  No return value.
  46.  
  47.  
  48. ARexx script play commands
  49. --------------------------
  50.  
  51. 'BEGINTIME' TIME/A UNITS/N
  52.  
  53.    Set the begin time for playing a script.  TIME is a string such as
  54.    "0:04:35.18", UNITS are optional units per second, describing the
  55.    numbers behind the decimal point in TIME (default UNITS is whatever is
  56.    current in JACOsub).  RESULT is returned as 0=success, 1=bad TIME
  57.    format, or 2=TIME decimal fraction conflicted with UNITS.
  58.  
  59. 'NEXTVIEW'
  60.  
  61.    To be called after PLAYSTART, but only if PLAYSETUP was called with the
  62.    argument AREXXTRIGGER.  This command causes the play screen to switch to
  63.    the next view.
  64.  
  65. 'PLAYSETUP' [TRIGGER/A]
  66.  
  67.    Set up program for playing a script.  Script will be compiled if needed.
  68.    RESULT is returned as 0=ready to begin playing, 1=failure.
  69.  
  70.    The optional argument TRIGGER defaults to the value INTERNAL, which is
  71.    normal play using the internal clock.  The internal run will run either
  72.    polled or as an event generator, according to the Playing/Video config
  73.    setting.
  74.  
  75.    If TRIGGER is set to AREXX, then JACOsub will expect to receive
  76.    'NEXTVIEW' commands for triggering each switch to the next screenful of
  77.    titles.  This is sort of like the manual step-play mode, only via ARexx.
  78.    It is important to know that short duration blank screens in between
  79.    titles also count as screens that must be triggered.
  80.  
  81.    If TRIGGER is set to EXTERNCLOCK, then JACOsub will expect to receive
  82.    timer data from a timecode reader.  THIS FEATURE IS NOT YET IMPLEMENTED.
  83.    For now, this setting behaves the same as INTERNAL.
  84.  
  85.    Any triggering mode will still accept the ESC keystroke to abort play. 
  86.  
  87. 'PLAYSTART'
  88.  
  89.    Start the script playing.  This command should be sent *only* after
  90.    successful execution of PLAYSETUP.  RESULT is returned as 0=success,
  91.    1=failure.
  92.  
  93. 'ABORTPLAY'
  94.  
  95.    Stop the script play, close play screen.  This command has no effect if
  96.    no script is currently playing.  There is no return value.
  97.  
  98. 'SCREENTOBACK'
  99.  
  100.   If the play screen exists, hide it behind the Workbench.  There is no
  101.   return value.
  102.  
  103. 'SCREENTOFRONT'
  104.  
  105.   Make sure the play screen is completely visible (if it exists).  There is
  106.   no return value.
  107.  
  108.  
  109. ARexx editor commands
  110. ---------------------
  111.  
  112. JACOsub maintains a "current line" pointer for ARexx.  The initial value is
  113. the top line of the script.  The WHICHLINE argument in these commands
  114. specifies on which line the command should operate.  The allowed values
  115. that may be passed for WHICHLINE are:
  116.  
  117.    CURRENT       Current line.  The current line pointer is not changed.
  118.    NEXT          Next line.  Command will fail with RESULT=1 if there
  119.                  is no next line, otherwise the current line pointer is
  120.                  changed to the next line.
  121.    TOP           Top line.  Current line pointer is changed to the top.
  122.    line number   Row in the editor.  Command will fail with RESULT=1 if the
  123.                  line does not exist in the script, otherwise the current
  124.                  line pointer is changed to the specified line.
  125.  
  126. All editor commands return RESULT as 0=success, 1=failure.  An editor
  127. command may fail for two reasons: specified line does not exist, or memory
  128. could not be allocated.  In any case, here are the commands:
  129.  
  130.  
  131. 'APPENDLINE' TEXT/A
  132.  
  133.    Append a line containing TEXT to the end of the script.  The current
  134.    line pointer is updated to point to this new line.
  135.  
  136. 'DELETELINE' WHICHLINE/A
  137.  
  138.    Delete the specified line.  The current line pointer is advanced to the
  139.    line that follows the one to be deleted, if it was deleted successfully.
  140.  
  141. 'GETLINE' WHICHLINE/A
  142.  
  143.    This command copies the specified line into a variable called JSTEXT and
  144.    returns it as a result, in addition to the RESULT code.
  145.  
  146. 'GETROW'
  147.  
  148.    The current line number is returned in RESULT.
  149.  
  150. 'INSERTLINE' WHICHLINE/A TEXT/A
  151.  
  152.    Insert a line containing TEXT in front of the specified line.
  153.  
  154. 'REPLACELINE' WHICHLINE/A TEXT/A
  155.  
  156.    Replace the specified line with a line containing TEXT.
  157.  
  158. 'SETCURRENTLINE' WHICHLINE/A
  159.  
  160.    Move the current line pointer to the specified line.  You will probably
  161.    not have to use this command, because the others also contain a current
  162.    line setting.
  163.  
  164.  
  165. CONTROLLING THE GVP G-LOCK OR THE NEWTEK VIDEO TOASTER
  166. ======================================================
  167.  
  168. Unlike the SuperGen, which JACOsub can control directly, performing
  169. dissolves with the GVP genlock and the Toaster genlock must be done through
  170. ARexx.  If you have configured JACOsub so that the GENLOCK setting is GVP
  171. or TOASTER, then JACOsub will look for a script called gvpfade.jsrx (for
  172. the GVP) or toasterfade.jsrx (for the Toaster) and copy it to
  173. ram:glfade.jsrx for faster execution at the appropriate times.  The
  174. original ARexx script should be located in JACOsub's rexx subdirectory, or
  175. the current directory, or in the rexx: directory.
  176.  
  177. This script is currently not provided.  If you want to write your own
  178. gvpfade.jsrx script, here are the specifications.
  179.  
  180. <scriptname>.jsrx BVAL/N BTIME/N GVAL/N GTIME/N
  181.  
  182. where
  183.    <scriptname> can be gvpfade or toasterfade.
  184.    BVAL  is the background video intensity value at which the dissolve
  185.          should finish.  This actually represents "blackness."  Minimum
  186.          value is 0 for full video, maximum is 100 for full black.
  187.          JACOsub assumes the genlock's BVAL=0 at the start of script play.
  188.    BTIME is the length of the background dissolve in field counts (there
  189.          are 60 fields per second in NTSC video).  A value of -1 means to
  190.          ignore the BVAL setting.
  191.    GVAL  is the foreground graphic overlay intensity at which the dissolve
  192.          should finish.  Minimum value is 0 (completely transparent),
  193.          maximum value is 63 (completely opaque).
  194.          JACOsub assumes the genlock's GVAL=100 at the start of script play.
  195.    GTIME is the length of the graphic overlay dissolve in frame counts.  A
  196.          value of -1 means to ignore the GVAL setting.
  197.  
  198.  
  199. End of ARexx.doc.
  200.